<template>
  <rt-list
    ref="moresearchList"
    :table-name="tableName"
    :columns="columns"
    :operations="operations"
    :title="title"
    :input-search-param="quickSearch"
    :controller-name="controllerName"
    :customize-action="customizeAction"
    :title-list="menuList"
    :default-param="defultList"
    :search-param="searchList"
    :hide-title="true"
    :disable-multi="disableMulti"
    search-placeholder="根据分类名称进行搜索"
  />
</template>

<script>
import RtList from '../../components/custome/rtList.vue';
import util from '../../libs/util';
export default {
  name: 'ArticleTypeList',
  components: {
    RtList
  },
  data() {
    return {
      menuList: {
        key: 'statecode',
        selected: 0,
        value: [
          {
            name: '启用的文章分类',
            value: '0'
          },
          {
            name: '停用的文章分类',
            value: '1'
          },
          {
            name: '所有的文章分类',
            value: '-1'
          }
        ]
      },
      controllerName: 'bbs/articletype',
      tableName: 'bbs_article_type',
      title: '自定义查询列表',
      operations: ['new', 'search', 'delete', 'activate', 'deactivate'],
      columns: [
        {
          prop: 'name',
          label: '文章分类名称',
          sortable: true,
          type: 'customizeAction',
          actionId: 'bbs_article_typeid'
        },
        {
          prop: 'statecodename',
          label: '状态',
          sortable: true,
          autoCol: true
        },
        { prop: 'seq', label: '序号', sortable: true }
      ],
      tableParam: {
        name: '',
        is_sys: '0'
      },
      quickSearch: ['name'],
      disableMulti: {
        column: {
          bbs_article_typeid: [
            '11111111-1111-1111-1111-111111111000',
            '11111111-1111-1111-1111-111111111001',
            '11111111-1111-1111-1111-111111111002'
          ]
        }
      },
      searchList: [],
      defultList: [{ key: 'is_sys', value: false }]
    };
  },
  mounted() {},
  methods: {
    customizeAction(row, actionId) {
      this.$router.push({
        name: 'bbsarticletypeedit',
        query: { addAndUpdate: true, id: row[actionId] }
      });
    }
  }
};
</script>

<style scoped></style>
